import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {HomeComponent} from './home/home.component';

const routes: Routes = [
  { path: 'home',  component: HomeComponent },
  { path: '',   redirectTo: '/home', pathMatch: 'full' },
  {
    path: 'form',
    loadChildren: () => import('./routes/form/form.module').then(m => m.FormModule)
  },
  {
    path: 'layout',
    loadChildren: () => import('./routes/layout/layout.module').then(m => m.LayoutModule)
  },
  {
    path: 'file',
    loadChildren: () => import('./routes/file/file.module').then(m => m.FileModule)
  },
  {
    path: 'table',
    loadChildren: () => import('./routes/table/table.module').then(m => m.TableModule)
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
